home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Apple WWDC 1996
/
WWDC96_1996 (CD).toast
/
Technology Materials
/
MacOS 8 Resources
/
Developer Tools
/
Mac OS 8 Interfaces & Libraries
/
Interfaces
/
CIncludes
/
ShutDown.h
< prev
next >
Wrap
C/C++ Source or Header
|
1996-05-01
|
3KB
|
112 lines
/*
File: ShutDown.h
Contains: Shutdown Manager Interfaces.
Version: Technology: System 7.5
Release: Universal Interfaces 3.0d3 on Copland DR1
Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
Bugs?: If you find a problem with this file, send the file and version
information (from above) and the problem description to:
Internet: apple.bugs@applelink.apple.com
AppleLink: APPLE.BUGS
*/
#ifndef __SHUTDOWN__
#define __SHUTDOWN__
#ifndef __TYPES__
#include <Types.h>
#endif
#ifndef __MIXEDMODE__
#include <MixedMode.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
#if PRAGMA_IMPORT_SUPPORTED
#pragma import on
#endif
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=mac68k
#endif
#if FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE
enum {
sdOnPowerOff = 1, /*call procedure before power off.*/
sdOnRestart = 2, /*call procedure before restart.*/
sdOnUnmount = 4, /*call procedure before unmounting.*/
sdOnDrivers = 8, /*call procedure before closing drivers.*/
sdRestartOrPower = 3 /*call before either power off or restart.*/
};
/*
This ProcPtr uses register based parameters on the 68k and cannot
be written in or called from a high-level language without the help of
mixed mode or assembly glue.
typedef pascal void (*ShutDwnProcPtr)(short shutDownStage);
*/
#if GENERATINGCFM
typedef UniversalProcPtr ShutDwnUPP;
#else
typedef Register68kProcPtr ShutDwnUPP;
#endif
enum {
uppShutDwnProcInfo = kRegisterBased
| REGISTER_ROUTINE_PARAMETER(1, kRegisterD0, SIZE_CODE(sizeof(short)))
};
#if GENERATINGCFM
#define NewShutDwnProc(userRoutine) \
(ShutDwnUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppShutDwnProcInfo, GetCurrentArchitecture())
#else
#define NewShutDwnProc(userRoutine) \
((ShutDwnUPP) (userRoutine))
#endif
#if GENERATINGCFM
#define CallShutDwnProc(userRoutine, shutDownStage) \
CallUniversalProc((UniversalProcPtr)(userRoutine), uppShutDwnProcInfo, (shutDownStage))
#else
/* (*ShutDwnUPP) cannot be called from a high-level language without the Mixed Mode Manager */
#endif
extern pascal void ShutDwnPower(void )
THREEWORDINLINE(0x3F3C, 0x0001, 0xA895);
extern pascal void ShutDwnStart(void )
THREEWORDINLINE(0x3F3C, 0x0002, 0xA895);
extern pascal void ShutDwnInstall(ShutDwnUPP shutDownProc, short flags)
THREEWORDINLINE(0x3F3C, 0x0003, 0xA895);
extern pascal void ShutDwnRemove(ShutDwnUPP shutDownProc)
THREEWORDINLINE(0x3F3C, 0x0004, 0xA895);
#endif
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=reset
#endif
#if PRAGMA_IMPORT_SUPPORTED
#pragma import off
#endif
#ifdef __cplusplus
}
#endif
#endif /* __SHUTDOWN__ */